#
# Try to find FreeImage library and include path.
# Once done this will define
#
# FREEIMAGE_FOUND
# FREEIMAGE_INCLUDE_PATH
# FREEIMAGE_LIBRARY
#

FIND_PATH( FREEIMAGE_INCLUDE_PATH FreeImage.h
	/usr/include
	/usr/local/include
	/sw/include
	/opt/local/include
	DOC "The directory where FreeImage.h resides")
FIND_LIBRARY( FREEIMAGE_LIBRARY
	NAMES freeimage
	PATHS
	/usr/lib64
	/usr/lib
	/usr/local/lib64
	/usr/local/lib
	/sw/lib
	/opt/local/lib
	DOC "The FreeImage library")


IF (FREEIMAGE_INCLUDE_PATH)
	SET( FREEIMAGE_FOUND 1 CACHE STRING "Set to 1 if FreeImage is found, 0 otherwise")
ELSE (FREEIMAGE_INCLUDE_PATH)
	SET( FREEIMAGE_FOUND 0 CACHE STRING "Set to 1 if FreeImage is found, 0 otherwise")
ENDIF (FREEIMAGE_INCLUDE_PATH)

MARK_AS_ADVANCED( FREEIMAGE_FOUND )
